home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / quicspool / wwfonts / troman.mf < prev    next >
Text File  |  1990-10-01  |  13KB  |  342 lines

  1. % $Header: troman.mf,v 1.1 88/01/15 13:15:20 simpson Rel $
  2. % $Log:    troman.mf,v $
  3. % Revision 1.1  88/01/15  13:15:20  simpson
  4. % initial release
  5. % Revision 0.1  88/01/07  08:15:18  simpson
  6. % beta test
  7. % The Computer Modern Roman family of fonts (by D. E. Knuth, 1979--1985)
  8.  
  9. if ligs>1: font_coding_scheme:="Troff text";
  10. else: font_coding_scheme:=if ligs=0: "TeX typewriter text"
  11.   else: "TeX text without f-ligatures" fi;
  12.  spanish_shriek=oct"016"; spanish_query=oct"017"; fi
  13. minus=oct"004"; vertical=oct"174";
  14.  
  15. mode_setup; font_setup;
  16.  
  17. % We need to create space characters with no bitmap for \| and \^.  I put
  18. % them in oct"000" and oct"177" since these characters are not normally
  19. % used by ditroff.
  20. % My own creation (...creation being a generous term), for \|, 1/6 em
  21. beginchar(oct"000", 16/6u#, 0, 0);
  22. endchar;
  23.  
  24. % My own creation, for \^, 1/12 em
  25. beginchar(oct"177", 16/12u#, 0, 0);
  26. endchar;
  27.  
  28. % From the font lasy10.mf, file lasy.mf
  29. cmchar "Box";
  30. beginchar(oct"024",2.1math_axis#+4u#,v_center(7u#));
  31. italcorr math_axis#*slant;
  32. adjust_fit(0,0); pickup rule.nib;
  33. numeric a; a=round(2.1math_axis);
  34. x1=x4=good.x 2u; x2=x3=x1+a;
  35. y3=y4=.5(cap_height-a); y1=y2=y3+a;
  36. draw z1--z2--z3--z4--cycle;
  37. labels(1,2,3,4); endchar;
  38.  
  39. % Stolen from font cmsy10, file symbol.mf
  40. cmchar "Open bullet";
  41. beginchar(oct"025",9u#,v_center(7u#));
  42. adjust_fit(0,0); pickup rule.nib; autorounded;
  43. lft x6=hround u; x2=w-x6; top y8=h; y2=math_axis;
  44. circle_points; draw_circle;  % circle
  45. labels(1,2,3,4,5,6,7,8); endchar;
  46.  
  47. % Stolen from the font cmr10, file accent.mf
  48. cmchar "Umlaut (double dot) accent";
  49. numeric dot_diam#,dot_diam;
  50. dot_diam#=max(dot_size#,cap_curve#);
  51. beginchar(oct"026",9u#,min(asc_height#,10/7x_height#+.5dot_diam#),0);
  52. dot_diam=max(tiny.breadth,hround(max(dot_size,cap_curve)-2stem_corr));
  53. italcorr h#*slant+.5dot_diam#-2.25u#;
  54. adjust_fit(0,0);
  55. pickup tiny.nib; pos1(dot_diam,0); pos2(dot_diam,90);
  56. x1=x2=2.75u; top y2r=h+1;
  57. if bot y2l<x_height+o+slab: y2l:=min(y2r-eps,x_height+o+slab+.5tiny); fi
  58. y1=.5[y2l,y2r]; dot(1,2);  % left dot
  59. pos3(dot_diam,0); penpos4(y2r-y2l,90); y3=y4=y1; x3=x4=w-x1;
  60. dot(3,4);  % right dot
  61. penlabels(1,2,3,4); endchar;
  62.  
  63. % Stolen from the font cmr10.mf, file accent.mf
  64. cmchar "Cedilla accent";
  65. beginchar(oct"027",8u#,0,.875desc_depth#);
  66. adjust_fit(0,0);
  67. x1=.5w+.5u;
  68. if serifs: pickup crisp.nib; pos1(stem,0); pos2(stem,0);
  69.  pos3(vair,90); pos4(stem,0); pos5(vair,-90);
  70.  x1=x2; z3l=z2l; x4=x2+1.5u; x5=x3-1.5u;
  71.  bot y1=-o; bot y2=-vround 2/7d-o; y4=.5[y3,y5]; bot y5=-d-o;
  72.  filldraw stroke z1e--z2e;  % stem
  73.  filldraw stroke z3e{right}...z4e{down}...{left}z5e;  % hook
  74. else: pickup fine.nib; pos1(vair,0); top y1=-o-2;
  75.  pos2(.5[vair,stem],0); bot y2=-d-o; x2=x1-1.25u;
  76.  filldraw stroke z1e--z2e; fi  % diagonal
  77. penlabels(1,2,3,4,5); endchar;
  78.  
  79. % My own creation, a zero width period.  Used for dots in pic(1).
  80. cmchar "Dot for pic boxes";
  81. numeric dot_diam#; dot_diam#=if monospace: 5/4 fi\\ dot_size#;
  82. define_whole_blacker_pixels(dot_diam);
  83. beginchar(oct"030",0,dot_diam#,0);
  84. period_width#:=5u#; define_pixels(period_width);
  85. pickup fine.nib;
  86. pos1(dot_diam,0); pos2(dot_diam,90);
  87. lft x1l=hround(.5period_width-.5dot_diam); bot y2l=0; z1=z2; dot(1,2);  % dot
  88. penlabels(1,2); endchar;
  89.  
  90. % My own creation.  The fractions look like hell.
  91. cmchar "1/4 symbol";
  92. beginchar(oct"021", 12u#, body_height#, paren_depth#);
  93. italcorr body_height#*slant-.5u#;
  94. adjust_fit(0,0); pickup rule.nib;
  95. rt x1=hround(w-u)+eps; top y1=h+eps;
  96. lft x2=hround u-eps; bot y2=-d-eps;
  97. draw z1--z2;  % diagonal
  98. x3=x4=1/4w; y3=38/40h; y4=23/40h; 
  99. draw z3--z4;  % number 1
  100. x5=x6=32/40w; y7=y8=1/8h; y5=-.2d; y6=.37h; x7=26/40w; x8=.85w;
  101. draw z5--z6--z7--z8;
  102. endchar;
  103.  
  104. % My own creation
  105. cmchar "1/2 symbol";
  106. beginchar(oct"022", 12u#, body_height#, paren_depth#);
  107. italcorr body_height#*slant-.5u#;
  108. adjust_fit(0,0); pickup rule.nib;
  109. rt x1=hround(w-u)+eps; top y1=h+eps;
  110. lft x2=hround u-eps; bot y2=-d-eps;
  111. draw z1--z2;  % diagonal
  112. x3=x4=1/4w; y3=38/40h; y4=23/40h; 
  113. draw z3--z4;  % number 1
  114. x5=x9=.65w; x10=x7=.85w; x6=.74w;
  115. y9=y10=-.2d; y6=.37h; y5=.32h; y7=.30h;
  116. draw z5{dir 45}..z6..z7{dir -90}..{dir 225}z9; % number 2
  117. draw z9--z10;
  118. endchar;
  119.  
  120. % My own creation.
  121. cmchar "3/4 symbol";
  122. beginchar(oct"023", 12u#, body_height#, paren_depth#);
  123. italcorr body_height#*slant-.5u#;
  124. adjust_fit(0,0); pickup rule.nib;
  125. rt x1=hround(w-u)+eps; top y1=h+eps;
  126. lft x2=hround u-eps; bot y2=-d-eps;
  127. draw z1--z2;  % diagonal
  128. draw (quartercircle rotated -90 & halfcircle) scaled .1875h shifted 
  129. (.25w,.8562h); % number 3
  130. draw (halfcircle rotated -180 & quartercircle) scaled .1875h shifted 
  131. (.25w,.6687h);
  132. x5=x6=32/40w; y7=y8=1/8h; y5=-.2d; y6=.37h; x7=26/40w; x8=.85w;
  133. draw z5--z6--z7--z8;
  134. endchar;
  135.  
  136. % From the font cmsy10, file sym.mf
  137. iff known vertical: cmchar "Vertical line";
  138. beginchar(vertical,5u#,body_height#,paren_depth#);
  139. italcorr body_height#*slant+.5rule_thickness#-2u#;
  140. adjust_fit(0,0); pickup rule.nib;
  141. x1=x2=good.x .5w; top y1=h+eps; bot y2=-d-eps;
  142. draw z1--z2;  % stem
  143. labels(1,2); endchar;
  144.  
  145. % My own creation
  146. cmchar "Rule";
  147. beginchar(oct"005",12u#,x_height#,.7u#);
  148. italcorr .5x_height#*slant-.5u#;
  149. adjust_fit(0,0);
  150. numeric below_baseline; below_baseline#:=.2u#;
  151. define_pixels(below_baseline);
  152. define_blacker_pixels(thickness);
  153. pickup crisp.nib; pos1(vair,90); pos2(vair,90);
  154. top y1r=top y2r=vround(-below_baseline); rt x2=hround(w+6u#);
  155. lft x1=hround(0);
  156. filldraw stroke z1e--z2e;  % bar
  157. penlabels(1,2); endchar;
  158.  
  159. % My own creation
  160. cmchar "Underscore";
  161. beginchar("_",12u#,x_height#,.7u#);
  162. italcorr .5x_height#*slant-.5u#;
  163. adjust_fit(0,0);
  164. numeric below_baseline; below_baseline#:=.2u#;
  165. define_pixels(below_baseline);
  166. pickup crisp.nib; pos1(vair,90); pos2(vair,90);
  167. top y1r=top y2r=vround(-below_baseline); x2=hround(w);
  168. x1=hround 0;
  169. filldraw stroke z1e--z2e;  % bar
  170. penlabels(1,2); endchar;
  171.  
  172. % Hyphen from cmr10, file comlig.mf
  173. cmchar "Hyphen";
  174. beginchar("-",6u#,x_height#,0);
  175. italcorr .5x_height#*slant-.5u#;
  176. adjust_fit(0,0);
  177. numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
  178. pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
  179. top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps;
  180. if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
  181. filldraw stroke z1e--z2e;  % bar
  182. penlabels(1,2); endchar;
  183.  
  184. % My own creation
  185. cmchar "Cent sign";
  186. beginchar(oct"020",18u#,asc_height#,desc_depth#); autorounded;
  187. adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
  188. lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
  189. circle_points; 
  190. x9=x11=.65[x6,x4]; x10=x12=.35[x4,x2]; 
  191. y9=y10=.35[y6,y8]; y11=y12=.65[y4,y6];
  192. x13=x14=.5[x6,x2]-.3u; y13=y4+2u; y14=y8-2u;
  193. draw z10..z9..z11..z12; draw z13--z14;
  194. labels(1,2,3,4,5,6,7,8,9,10,11,12,13,14); endchar;
  195.  
  196. % My own creation
  197. cmchar "Copyright";
  198. beginchar(oct"016",18u#,asc_height#,desc_depth#); autorounded;
  199. adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
  200. lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
  201. circle_points; draw_circle;  % circle
  202. x9=x11=.65[x6,x4]; x10=x12=.35[x4,x2]; 
  203. y9=y10=.35[y6,y8]; y11=y12=.65[y4,y6];
  204. draw z10..z9..z11..z12;
  205. labels(1,2,3,4,5,6,7,8,9,10,11,12); endchar;
  206.  
  207. % My own creation
  208. cmchar "Registered";
  209. beginchar(oct"017",18u#,asc_height#,desc_depth#); autorounded;
  210. adjust_fit(if monospace:-3u#,-3u# else: 0,0 fi); pickup rule.nib;
  211. lft x6=hround u; x2=w-x6; top y8=h+o; bot y4=-d-o;
  212. circle_points; draw_circle;  % circle
  213. x9=x11=x12=.7[x6,x8]; x10=x13=.3[x4,x2]; 
  214. y12=y13=.5[y4,y6]; y9=.5[y6,y8]; y11=.5[y12,y9]; y10=.5[y11,y9];
  215. x14=.08[x4,x2]; y14=y9; 
  216. path p;
  217. p=z9--z14{dir 0}..z10..{dir 180}z11;
  218. z15=point 2.6 of p;
  219. draw z12--z9; draw z13--z15; draw p;
  220. labels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); endchar;
  221.  
  222. % Stolen from the font cmr10, file accent.mf (actually the acute accent)
  223. cmchar "Footmark";
  224. beginchar(oct"015",9u#,min(asc_height#,2x_height#),0);
  225. italcorr h#*slant-if serifs: 1.5 fi u#;
  226. adjust_fit(0,0);
  227. if serifs: pickup crisp.nib; x1+.5stem=hround(w-2u); x2=2/3[x1,w-x1];
  228.  y1+.5stem=h+eps; y2=max(2/3[h,x_height],x_height+o+hair);
  229.  numeric theta; theta=angle(z2-z1)+90;
  230.  pos1(stem,theta); pos2(hair,theta);
  231.  filldraw circ_stroke z1e--z2e;  % diagonal
  232. else: pickup fine.nib; pos1(stem,0); pos2(vair,0);
  233.  rt x1r=hround(w-1.5u); lft x2l=hround(.5w-.25u-.5vair);
  234.  top y1=h; bot y2=vround 2/3[h,x_height];
  235.  filldraw stroke z1e--z2e; fi  % diagonal
  236. penlabels(1,2); endchar;
  237.  
  238. % Stolen from the font cmsy10, file symbol.mf
  239. cmchar "Dagger mark";
  240. beginchar(oct"014",8u#,asc_height#,desc_depth#);
  241. adjust_fit(0,0); pickup fine.nib;
  242. pos1(stem,0); pos2(thin_join,0); pos3(stem,0); pos4(hair,0);
  243. pos5(stem,90); pos2'(thin_join,90); pos6(stem,90); z2'=z2;
  244. x1=x2=x3=x4; x1-.5stem=hround(.5w-.5stem); w:=r:=2x1;
  245. x5-.5stem=hround u; x6=w-x5;
  246. y1+.5stem=h+oo; y2=y5=y6; y3=.57y2; bot y4=-d-o;
  247. y5+.5stem=floor(x_height+.5stem);
  248. filldraw circ_stroke z1e{down}..z2e{down}..z3e{down}..z4e;  % stem
  249. filldraw circ_stroke z5e{right}..{right}z2'e;  % left bulb
  250. filldraw circ_stroke z6e{left}..{left}z2'e;  % right bulb
  251. penlabels(1,2,3,4,5,6); endchar;
  252.  
  253. % Stolen from the font cmr10, file accent.mf (the Scandinavian circle accent)
  254. cmchar "Degree";
  255. beginchar(oct"013",13u#+4/3(asc_height#-x_height#)*slant,asc_height#,0);
  256. adjust_fit(cap_serif_fit#,cap_serif_fit#);
  257. numeric circ_hair,circ_vair;
  258. circ_hair=hround min(hair,u+.5); circ_vair=vround min(vair,(h-x_height)/6+.5);
  259. penpos1(circ_vair,90); penpos3(circ_vair,-90);
  260. penpos2(circ_hair,180); penpos4(circ_hair,0);
  261. x2r=hround(.5w-1.5u-.5circ_hair);
  262. x4r=w-x2r; x1=x3=.5w; y1r=h+apex_o; y2=y4=.5[y1,y3];
  263. y3r=vround(1/3[x_height,h]+apex_o);
  264. penstroke pulled_arc.e(1,2) & pulled_arc.e(2,3)
  265.  & pulled_arc.e(3,4) & pulled_arc.e(4,1) & cycle;  % bowl
  266. penlabels(1,2,3,4); endchar;
  267.  
  268. % My own creation
  269. cmchar "Square";
  270. beginchar(oct"010",9u#,v_center(7u#));
  271. italcorr math_axis#*slant;
  272. adjust_fit(0,0); pickup rule.nib;
  273. draw unitsquare scaled 7u shifted (.5w-7u/2,math_axis-7u/2);
  274. endchar;
  275.  
  276. % Stolen from the font cmsy10, file symbol.mf
  277. cmchar "Bullet";
  278. beginchar(oct"007",9u#,v_center(7u#));
  279. adjust_fit(0,0); pickup rule.nib; autorounded;
  280. lft x6=hround u; x2=w-x6; top y8=h; y2=math_axis; circle_points;
  281. filldraw z8{right}...z1{z2-z8}...z2{down}...z3{z4-z2}...z4{left}
  282.   ...z5{z6-z4}...z6{up}...z7{z8-z6}...cycle;  % circle and interior
  283. labels(1,2,3,4,5,6,7,8); endchar;
  284.  
  285. % Stolen from the font cmsy10, file sym.mf
  286. iff known minus: cmchar "Minus sign";
  287. beginarithchar(minus); pickup rule.nib;
  288. lft x1=hround 1.5u-eps; x2=w-x1; y1=y2=math_axis;
  289. draw z1--z2;  % bar
  290. labels(1,2); endchar;
  291.  
  292. input romanu;  % upper case (majuscules)
  293. input romanl;  % lower case (minuscules)
  294. input romand;  % numerals
  295. input romanp;  % ampersand, question marks, currency sign
  296. input tpunct;  % punctuation symbols common to roman and italic text
  297. if ligs>1: input tromlig; fi  % letter ligatures
  298. if ligs>0: input tcomlig; fi  % ligatures common with italic text
  299. if ligs<=1: input romsub; fi  % substitutes for ligatures
  300.  
  301. font_slant slant; font_x_height x_height#;
  302. if monospace: font_normal_space 9u#; % no stretching or shrinking
  303.  font_quad 18u#;
  304.  font_extra_space 9u#;
  305. else: font_normal_space 6u#+2letter_fit#;
  306.  font_normal_stretch 3u#; font_normal_shrink 2u#;
  307.  font_quad 18u#+4letter_fit#;
  308.  font_extra_space 2u#;
  309.  k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; % three degrees of kerning
  310.  ligtable "k": if serifs: "v": "a" kern -u#, fi\\"w": "e" kern k#,
  311.   "a" kern k#, "o" kern k#, "c" kern k#;
  312.  ligtable "P": "A" kern kk#,
  313.   "y": "o" kern k#, "e" kern k#, "a" kern k#, "." kern kk#, "," kern kk#;
  314.  ligtable "F": "V": "W": if serifs: "o" kern kk#, "e" kern kk#, "u" kern kk#,
  315.     "r" kern kk#, "a" kern kk#, "A" kern kkk#,
  316.    else: "o" kern k#, "e" kern k#, "u" kern k#,
  317.     "r" kern k#, "a" kern k#, "A" kern kk#, fi
  318.   "K": "X": "O" kern k#, "C" kern k#, "G" kern k#, "Q" kern k#;
  319.  ligtable "T": "y" kern if serifs: k# else: kk# fi,
  320.   "Y": "e" kern kk#, "o" kern kk#,
  321.    "r" kern kk#, "a" kern kk#, "A" kern kk#, "u" kern kk#;
  322.  ligtable "O": "D": "X" kern k#, "W" kern k#, "A" kern k#,
  323.    "V" kern k#, "Y" kern k#;
  324.  if serifs: ligtable "h": "m": "n":
  325.    "t" kern k#, "u" kern k#, "b" kern k#, "y" kern k#, "v" kern k#, "w" kern k#;
  326.   ligtable "c": "h" kern k#, "k" kern k#; fi
  327.  ligtable "o": "b": "p": "e" kern -k#, "o" kern -k#, "x" kern k#,
  328.    "d" kern -k#, "c" kern -k#, "q" kern -k#,
  329.   "a": if serifs: "v" kern k#, "j" kern u#, else: "r" kern k#, fi
  330.   "t": "y" kern k#,
  331.   "u": "w" kern k#;
  332.  ligtable "A": if serifs: "R": fi\\ "t" kern k#,
  333.   "C" kern k#, "O" kern k#, "G" kern k#, "U" kern k#, "Q" kern k#,
  334.   "L": "T" kern kk#, "Y" kern kk#, "V" kern kkk#, "W" kern kkk#;
  335.  ligtable "g": "j" kern -k#; % logjam
  336.  ligtable "I": "I" kern -k#; fi % Richard III
  337.  % there are ligature/kern programs for |"f"| in the {\tt romlig} file
  338.  % and for |"-"|, |"`"|, and |"'"| in the {\tt comlig} file
  339. bye.
  340.